﻿using Microsoft.EntityFrameworkCore;
using Paas.Pioneer.Domain;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Paas.Pioneer.Admin.Core.Domain.Works.Comment
{
    /// <summary>
    /// 评论表
    /// </summary>
    [Table("Works_Comment")]
    [Comment("评论表")]
    [Index(nameof(WorksInfoId), Name = "IDX_WorksInfoId")]
    [Index(nameof(UserId), Name = "IDX_UserId")]
    [Index(nameof(ParentId), Name = "IDX_ParentId")]
    public class Works_CommentEntity : BaseEntity
    {
        /// <summary>
        /// 作品ID
        /// </summary>
        [Comment("作品ID")]
        [Column("WorksInfoId", TypeName = "char(36)")]
        public Guid WorksInfoId { get; set; }

        /// <summary>
        /// 评论用户ID
        /// </summary>
        [Comment("评论用户ID")]
        [Column("UserId", TypeName = "char(36)")]
        public Guid UserId { get; set; }

        /// <summary>
        /// 父级节点
        /// </summary>
        [Comment("父级节点")]
        [Column("ParentId", TypeName = "char(36)")]
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 评论内容
        /// </summary>
        [Comment("评论内容")]
        [Column("CommentContent", TypeName = "varchar(500)")]
        public string CommentContent { get; set; }
    }
}
